package com.oa.cms.controller.api;

import com.oa.cms.domain.dto.CmsVersionDto;
import com.oa.cms.query.CmsVersionQuery;
import com.oa.cms.query.base.Page;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by gold-jx on 2017/12/6.
 */
@RequestMapping("version")
public interface CmsVersionApi {

    @ApiOperation(value = "【管端】CMS版本新增", notes = "add the cms version", response = CmsVersionDto.class, tags = {"CMS - Version",})
    @ApiResponse(code = 200, message = "版本新增成功！")
    @RequestMapping(value = "/add/", method = RequestMethod.POST)
    ResponseEntity<Void> addCmsVersion(@ApiParam(value = "CMS版本新增",required = true)  @RequestBody CmsVersionDto cmsVersionDto);


    @ApiOperation(value = "【管端】CMS版本修改", notes = "update the cms version", response = CmsVersionDto.class, tags = {"CMS - Version",})
    @ApiResponse(code = 200, message = "版本修改成功！")
    @RequestMapping(value = "/update/", method = RequestMethod.POST)
    ResponseEntity<Void> updateCmsVersion(@ApiParam(value = "CMS版本修改",required = true)  @RequestBody CmsVersionDto cmsVersionDto);


    @ApiOperation(value = "【管端】【真】CMS版本删除", notes = "real delete the cms version", response = CmsVersionDto.class, tags = {"CMS - Version",})
    @ApiResponse(code = 200, message = "版本新增成功！")
    @RequestMapping(value = "/realDelete/", method = RequestMethod.POST)
    ResponseEntity<Void> deleteRealCmsVersion(@ApiParam(value = "CMS版本真删除",required = true) @RequestBody String id);

    @ApiOperation(value = "【管端】【假】CMS版本删除", notes = "false delete the cms version", response = CmsVersionDto.class, tags = {"CMS - Version",})
    @ApiResponse(code = 200, message = "版本新增成功！")
    @RequestMapping(value = "/falseDelete/", method = RequestMethod.POST)
    ResponseEntity<Void> deleteFalseCmsVersion(@ApiParam(value = "CMS版本假删除",required = true) @RequestBody String id);


    @ApiOperation(value = "【管端】 CMS版本列表", notes = "List the cms version", response = CmsVersionDto.class, tags = {"CMS - Version",})
    @ApiResponses(value = {@ApiResponse(code = 200, message = "Successful response", response = CmsVersionDto.class)})
    @RequestMapping(value = "/getVersion/", method = RequestMethod.GET)
    ResponseEntity<Page<CmsVersionDto>> getVersion(CmsVersionQuery cmsVersionQuery);







}
